package com.cashmama.market.api.application.enums;

/**
 * Created with IntelliJ IDEA.
 * User: yujianfu (mr.vencnet@gmail.com)
 * Date: 2019-12-20
 * Time: 16:34
 */
public enum AuthenticationTypeEnum {

    ADVANCE_AI("advanceAi", "advanceAi"),
    AADHAAR("aadhaar", "aadhaar"),
    VOTER("voter", "voter"),
    DRIVER("driver", "driver"),
    PASSPORT("passport", "passport"),
    PERSONAL_INFO("personalInfo", "personalInfo"),
    BANK("bank", "bank"),
    WORK("work", "work"),
    EMAIL("email", "email"),
    PANCARD("pancard", "pancard");


    private String type;

    private String desc;

    AuthenticationTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public String getType() {
        return type;
    }

    public AuthenticationTypeEnum setType(String type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public AuthenticationTypeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static boolean isTypeExist(String type) {
        for (AuthenticationTypeEnum typeEnum : AuthenticationTypeEnum.values()) {
            if (typeEnum.getType().equals(type)) {
                return true;
            }
        }

        return false;
    }

}
